Optimal. Leaf size=33 \[ 3 a^2 b \log (x)+a^3 x-\frac{3 a b^2}{x}-\frac{b^3}{2 x^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0125911, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {193, 43} \[ 3 a^2 b \log (x)+a^3 x-\frac{3 a b^2}{x}-\frac{b^3}{2 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 193
Rule 43
Rubi steps
\begin{align*} \int \left (a+\frac{b}{x}\right )^3 \, dx &=\int \frac{(b+a x)^3}{x^3} \, dx\\ &=\int \left (a^3+\frac{b^3}{x^3}+\frac{3 a b^2}{x^2}+\frac{3 a^2 b}{x}\right ) \, dx\\ &=-\frac{b^3}{2 x^2}-\frac{3 a b^2}{x}+a^3 x+3 a^2 b \log (x)\\ \end{align*}
Mathematica [A] time = 0.0034689, size = 33, normalized size = 1. \[ 3 a^2 b \log (x)+a^3 x-\frac{3 a b^2}{x}-\frac{b^3}{2 x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 32, normalized size = 1. \begin{align*} -{\frac{{b}^{3}}{2\,{x}^{2}}}-3\,{\frac{{b}^{2}a}{x}}+{a}^{3}x+3\,{a}^{2}b\ln \left ( x \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.999899, size = 42, normalized size = 1.27 \begin{align*} a^{3} x + 3 \, a^{2} b \log \left (x\right ) - \frac{3 \, a b^{2}}{x} - \frac{b^{3}}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.41766, size = 81, normalized size = 2.45 \begin{align*} \frac{2 \, a^{3} x^{3} + 6 \, a^{2} b x^{2} \log \left (x\right ) - 6 \, a b^{2} x - b^{3}}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.311338, size = 31, normalized size = 0.94 \begin{align*} a^{3} x + 3 a^{2} b \log{\left (x \right )} - \frac{6 a b^{2} x + b^{3}}{2 x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20756, size = 42, normalized size = 1.27 \begin{align*} a^{3} x + 3 \, a^{2} b \log \left ({\left | x \right |}\right ) - \frac{6 \, a b^{2} x + b^{3}}{2 \, x^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]